<?php
/**
 * Created by PhpStorm.
 * User: u
 * Date: 2019/4/2
 * Time: 13:51
 */

namespace common\sources\read\praisekeywords;


use common\models\craftsman\PraiseKeywords;

class PraiseKeywordsAccess implements IPraiseKeywordsAccess
{
    public function keyWorkers($task_id) {
        $result = PraiseKeywords::find()
            ->select("id,word,is_user")
            ->where(['task_commod_id' => $task_id])
            ->asArray()
            ->all();
        return $result;
    }

    //根据ID获取详情
	public function geIdInfo($id) {
		$result = PraiseKeywords::find()
			->select("id,word,bus_id,task_commod_id,value_service_id,is_user,create_time")
			->where(['id' => $id])
			->asArray()
			->one();
		return $result;
	}
}